﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Menu.Master" AutoEventWireup="true" CodeBehind="frmRegSilabo.aspx.cs" Inherits="GestionCurriculos.frmRegSilabo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script>
    function regresar() {
        //window.location.assign("frmSilabo.aspx");
        if (confirm('¿ Desea cancelar el registro de sílabo ?') == true) {
            window.location.assign("frmSilabo.aspx");
        }
        else {
            return false;
        }

    }

    function ValidaSoloNumeros() {
        if ((event.keyCode < 48) || (event.keyCode > 57))
            event.returnValue = false;
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div style="margin:5px; font-family:Rambla">

    <div style="text-align:center">
        <h1> <asp:Label runat="server" ID="lblTitulo"></asp:Label> </h1>
    </div>

    <!-- BOTONERA -->
    <div style="width:90%; height:25px; background-color:#064066;">
        &nbsp;&nbsp;
        <asp:Button runat="server" ID="btnGuardar" Text="Guardar" onclick="btnGuardar_Click" 
            /> <%--onclick="btnGuardar_Click"--%>
        <asp:Button runat="server" ID="btnCancelar" Text="Cancelar" 
            onclick="btnCancelar_Click"   OnClientClick="return regresar();" CausesValidation="False" 
            /><%--onclick="btnCancelar_Click"--%>
    </div>
    <!-- FORMULARIO -->
    <div> <asp:UpdatePanel runat="server" ID="up1">
            <ContentTemplate>
        <table>
            <tr>
                <td style="width:150px">Curso<b style="color:Red">*</b></td>
                <td>:</td>
                <td><asp:DropDownList runat="server" ID="cboCurso" 
                        onselectedindexchanged="cboCurso_SelectedIndexChanged" AutoPostBack="true">
                    </asp:DropDownList>
                    
                  <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
           ErrorMessage="Seleccione un curso." style="color:Red"
    ControlToValidate="cboCurso" InitialValue="Seleccionar"/>

                    </td>
            </tr>
            <tr>
                <td>Nombre</td>
                <td>:</td>
                <td><asp:Label ID="lblNombre" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>C&oacute;digo</td>
                <td>:</td>
                <td><asp:Label ID="lblCodigo" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Horas</td>
                <td>:</td>
                <td><asp:Label runat="server" ID="lblHoras"></asp:Label></td>
            </tr>
            <tr>
                <td>Cr&eacute;ditos</td>
                <td>:</td>
                <td><asp:Label runat="server" ID="lblCreditos"></asp:Label></td>
            </tr>
            <tr>
                <td>&Aacute;rea de Conocimiento</td>
                <td>:</td>
                <td><asp:Label runat="server" ID="lblAreaConocimiento"></asp:Label></td>
            </tr>
            <tr>
                <td>Per&iacute;odo Acad&eacute;mico</td>
                <td>:</td>
                <td><asp:TextBox runat="server" ID="txtPeriodo" Enabled="false" ></asp:TextBox></td>
            </tr>
            <tr>
                <td>Semanas<b style="color:Red">*</b></td>
                <td>:</td>
                <td><asp:TextBox runat="server" ID="txtSemanas" MaxLength="5" onkeypress="ValidaSoloNumeros()"></asp:TextBox>
                             <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" SetFocusOnError="true" style="color:Red"
                        ControlToValidate="txtSemanas" ErrorMessage="El campo # semanas es requerido.">
                    </asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>Horas por Semanas<b style="color:Red">*</b></td>
                <td>:</td>
                <td><asp:TextBox runat="server" ID="txtHorSemana" MaxLength="5" onkeypress="ValidaSoloNumeros()"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" SetFocusOnError="true" style="color:Red"
                        ControlToValidate="txtHorSemana" ErrorMessage="El campo horas por semana es requerido.">
                    </asp:RequiredFieldValidator>
                    </td>
            </tr>
            <tr>
                <td colspan="3"> <H2>I. Introducci&oacute;n</H2></td>
            </tr>
            <tr>
                <td colspan="3"><asp:TextBox runat="server" ID="txtIntroduccion" TextMode="MultiLine" Width="600" Height="100"></asp:TextBox></td>
            </tr>
             <tr>
                <td colspan="3"> <H2>II. Logros</H2></td>
            </tr>
            <tr>
                 <td colspan="3"><asp:TextBox runat="server" ID="txtLogro" TextMode="MultiLine" Width="600" Height="100"></asp:TextBox></td>
            </tr>
            
            <tr>
                <td colspan="3"> <H2>III. Unidades de Aprendizaje</H2></td>
            </tr>
            <tr>
                <td colspan="3"><asp:TextBox runat="server" ID="txtUnidad" TextMode="MultiLine" Width="600" Height="100"></asp:TextBox></td>
            </tr>
            <tr>
            <!--
            <tr>
                <td>Unidad Aprendizaje</td>
                <td>:</td>
                <td><asp:DropDownList runat="server" ID="cboUnidad" Width="200"></asp:DropDownList> 
                              
             <asp:Button runat="server" ID="Button1" Text="Agregar" onclick="Button1_Click" CausesValidation="False" 
                        /><asp:Button runat="server" 
                        ID="Button2" Text="X"  /> </td>
            </tr>

            <tr>
                <td></td>
                <td></td>
                <td valign="top">
                    <asp:ListBox runat="server" ID="lstUnidad" Width="250" Height="70">
                        
                    </asp:ListBox> 
                    <asp:Button runat="server" ID="btnEliminarBUA" Text="X" onclick="btnEliminarBUA_Click" 
                        />
                </td>
            </tr>
            -->
            <tr>
                <td colspan="3"> <H2>IV. Metodología</H2></td>
            </tr>
            <tr>
                <td colspan="3"><asp:TextBox runat="server" ID="txtMetodologia" TextMode="MultiLine" Width="600" Height="100"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="3"> <H2>V. Evaluación<b style="color:Red">*</b></H2></td>
            </tr>
             <tr>
                <td>Tipo</td>
                <td>:</td>
                <td><asp:DropDownList runat="server" ID="cboEvaluacion" Width="200"></asp:DropDownList> 
                              
             <asp:Button runat="server" ID="btnAgregarEval" Text="Agregar" 
                        onclick="btnAgregarEval_Click" CausesValidation="False"/><asp:Button runat="server" 
                        ID="btnEliminarEval" Text="X" onclick="btnEliminarEval_Click" /> </td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td valign="top">
                    <asp:ListBox runat="server" ID="lstEvaluaciones" Width="250" Height="100" style="display:none">
                        
                    </asp:ListBox>
                    <asp:GridView runat="server" ID="gvEvaluaciones" AutoGenerateColumns="False"  CellPadding="4" ForeColor="#333333" GridLines="None"
                         ><AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="">
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="chkEval"/>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="codEvaluacion" HeaderText="Código" />
                            <asp:BoundField DataField="tipo" HeaderText="Tipo" />
                            <asp:TemplateField HeaderText="Peso">
                                <ItemTemplate>
                                    <asp:TextBox runat="server" id="txtPesoEval" Width="40" MaxLength="3" Text='<%# Eval("peso") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                        </Columns>
                         <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" BorderColor="Black" BorderStyle="solid" BorderWidth="1px" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB"  BorderColor="Black" BorderStyle="solid" BorderWidth="1px"  />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                    
                </td>
            </tr>
            <tr>
                <td colspan="3"><H2>VI. Bibliograf&iacute;a</H2></td>
            </tr>
            <tr>
                <td>Nombre</td>
                <td>:</td>
                <td><asp:DropDownList runat="server" ID="cboBibliografia" Width="200"></asp:DropDownList> 
                              
             <asp:Button runat="server" ID="btnAgregarB" Text="Agregar" 
                        onclick="btnAgregarB_Click" CausesValidation="False"/> </td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td valign="top">
                    <asp:ListBox runat="server" ID="lstBibliografias" Width="250" Height="70">
                        
                    </asp:ListBox> 
                    <asp:Button runat="server" ID="btnEliminarB" Text="X" onclick="btnEliminarB_Click" 
                        />
                </td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td><b style="color:Red">Los campos (*) son obligatorios </b></td>
            </tr>            
        </table></ContentTemplate>
            </asp:UpdatePanel>
    </div>
</div>
</asp:Content>
